package com.cmbchina.ccd.enums;


public enum  ActivityEnum {

    ACTIVITY_ALL_TOTAL("十元风暴奖品日兑换数量", 1),
    ACTIVITY_ALL_ACC("十元风暴组队PK日参与人次", 2),
    ACTIVITY_ALL_SUCCESS("十元风暴分会场日领取总量", 7),
    ACTIVITY_ALL_ALL("十元风暴日发喵总量", 21),


    PAY_ALL("饭票订单", 5),
    PAY_SUCCESS("影票订单", 6),
    PAY_FAIL("充值订单", 3),
    PAY_REFUND("分期商城订单", 4),

    PAY_REFUND_v1("积分商城订单", 30),
    PAY_REFUN_v2("分期商城订单", 31),
    PAY_REFUND_v3("十元风暴", 32),

    DRUMSTICK_SCRATCH_NUM("鸡腿节刮奖人数", 8),
    DRUMSTICK_R_NUM("鸡腿节达标人数", 10),
    DRUMSTICK_SCRATCH_AMOUNT("鸡腿节刮奖发放额", 11),

    CONSUMER_CREDIT_NUM("消费信贷消费分期人数", 12),
    CONSUMER_CREDIT_AMOUNT("消费信贷消费分期总额", 13),

    BIY_BAR_NUM("汽车平台各卡部意向车名单数", 14),

    CAR_WASH_ORDER_NUM("洗车美容订单数量", 15),
    CAR_FEN_ORDER_AMOUNT("汽车消费分期总额", 33),
    CAR_FEN_ORDER_TOA("汽车消费分期人数", 34),

    //CAR_BEAUTY_ORDER_NUM("汽车美容订单数量", 16),


    USER_MAU("MAU", 17),
    USER_DAU("DAU", 18),
    USER_PU("掌上生活用户登录数", 19),
    USER_PV("掌上生活主页浏览次数", 20);

    private String name ;
    private int index ;

    private ActivityEnum( String name , int index ){
        this.name = name ;
        this.index = index ;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }

    public static String getNameById(Integer index) {
        ActivityEnum[] values = ActivityEnum.values();
        for (ActivityEnum activityEnum : values) {
            int index1 = activityEnum.getIndex();
            if(index == index1) {
                return activityEnum.getName();
            }
        }
        return "";
    }
}
